package com.design.pattern.structural.proxy;

/**
 * description
 *
 * @author RenQiQiang 2019/03/13 9:49
 */
public class OrderServiceImpl implements IOrderService{

    private IOrderDao iOrderDao;

    @Override
    public int saveOrder(Order order) {
        //模拟spring注入
        iOrderDao = new IOrderDaoImpl();
        System.out.println("Service层调用Dao层添加Order");
        return iOrderDao.insert(order);
    }
}
